<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/pub/includ.jsp"%>
<%@ include file="/pub/tree_common.jsp"%>
<HTML>
<HEAD>
</HEAD>
<BODY topmargin="0" leftmargin="0">
<table  height="100%" width="100%">
   <tr>
    <td valign="top">
	<center>
	<input type="button" onclick="_submit()" class="button_nbw" value="确  认" />
	</center>
    <div id="treeObject" ></div>
    </td>
   </tr>
</table> 
<script>   
	var existDeptIds = window.dialogArguments;
    tree=new dhtmlXTreeObject('treeObject',"100%","100%",0); 
    tree.setImagePath("<%=xtreePath%>"); 
    tree.enableDragAndDrop(false);   
    tree.setXMLAutoLoading("<%=path%>/sys/org/showTreeCheckbox?existDeptIds="+existDeptIds+"&aa=aa");
    tree.enableCheckBoxes(1);
    tree.enableThreeStateCheckboxes(true);
    tree.loadXML("<%=path%>/sys/org/showTreeCheckbox?existDeptIds="+existDeptIds+"&aa=aa");
    function _submit(){
        var retvalue = "";
        var orgs = tree.getAllChecked().split(",");
        if(orgs.length > 0){
        	retvalue += orgs[0]+"%"+tree.getItemText(orgs[0]);
        }
		for(var i=1;i<orgs.length;i++){
			retvalue += ","+orgs[i]+"%"+tree.getItemText(orgs[i]);
		}
        window.returnValue = retvalue;
		window.close();
	}
	//function doOnDblClick(nodeId){
	//	alert(nodeId);
	//	return false;
	//}
</script> 
</body>
</html>
